<?php

namespace app\common\service\system;

use app\common\model\system\Menu;
use app\common\model\system\User;
use app\common\service\BaseService;

class MenuService extends BaseService
{
    public function initialize()
    {
        parent::initialize();
        $this->model = new Menu();
    }

    /**
     * 获取用户菜单
     * @param $user_id
     * @return mixed
     */
    public function getTree($user_id){
        return $this->model->getTree($user_id);
    }
    public function getMenuTree($user_id){
        $menu_list = $this->model->getList();
        $user_node = app(User::class)->getNodeList($user_id);

    }
}